package com.open.common.util;

import com.alibaba.druid.filter.config.ConfigTools;

public class DruidUitls {

	// 解密
	public static String decrypt(String str) {
		String result = null;
		try {
			result = ConfigTools.decrypt(str);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}

	// 加密
	public static String encrypt(String str) {
		String result = null;
		try {
			result = ConfigTools.encrypt(str);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}

	public static void main(String[] args) {
		System.out.println(decrypt("VSARnw6e9trapOyfdIwMfWDSf0ewI7tjnS/g6NStPNVgK5Ohvspu6fWflsKHCihKY6AJXOVRZCiPdeyhyR/8Rg=="));
		System.out.println(encrypt("123456"));
	}

}
